using System;
using Microsoft.Web.Administration;
using Microsoft.Web.Management.Iis.Client;

namespace Microsoft.Web.Management.Iis.Server
{
    /// <summary>
    /// Serves as a configuration element that can read/write configuration values
    /// for the configurationElement.
    /// </summary>
    internal sealed class HttpLoggingSection : ConfigurationSection
    {
        /********************************************************************************************
           STATIC FIELDS
         *******************************************************************************************/
        // Child attribute names
        private const string DontLogAttribute = "dontLog";
        private const string SelectiveLoggingAttribute = "selectiveLogging";

        /********************************************************************************************
           PROPERTIES
         *******************************************************************************************/

        /// <summary>
        /// Gets or sets a value that indicates that logging should be done or not.
        /// </summary>
        public Boolean DontLog
        {
            get
            {
                return (Boolean)base[DontLogAttribute];
            }
            set
            {
                base[DontLogAttribute] = value;
            }
        }

        /// <summary>
        /// Gets or sets a value that indicates what items should be logged.
        /// </summary>
        public SelectiveLogging SelectiveLogging
        {
            get
            {
                return (SelectiveLogging)base[SelectiveLoggingAttribute];
            }
            set
            {
                base[SelectiveLoggingAttribute] = value;
            }
        }
    }
}
